<script setup>
import { useRouter } from 'vue-router'

const router = useRouter();

let fun = (id, language) => {
  router.push('/detail?id=1&language=Python');
}

</script>

<template>
  <div>
    <input type="button" @click="fun()" value="编程式路由键值对传参" />
    <hr>
    <router-view></router-view>
  </div>
</template>

<style scoped>

</style>
